package com.holystone.orca.itsm.system.service.impl;

import com.holystone.orca.itsm.system.model.SysPrivilege;
import com.holystone.orca.itsm.system.service.SysPrivilegeService;
import com.holystone.orca.itsm.system.service.base.BaseServiceImpl;
import com.holystone.orca.itsm.system.service.common.SysConstant;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

@Service
public class SysPrivilegeServiceImpl extends BaseServiceImpl<SysPrivilege> implements SysPrivilegeService {

    @Override
    public List<SysPrivilege> selectActiveSysPrivilege() {
        Example example = new Example(SysPrivilege.class);
        example.createCriteria().andEqualTo("state", SysConstant.STATU_ACTIVE);
        return selectByExample(example);
    }

}
